Compact Routes stats dash and chart 'Now' label - #344
Merged
Conversation
Replace arrow with dash in the matched/threshold/degraded stat
(0/2→6 becomes 0/2-6) to save horizontal space and prevent the
stats row from wrapping on mobile.
Change the last history chart label from 'Last XXh' to 'Now' for
clarity and brevity.
Add 'now' key to en.json ('Now') and nl.json ('Nu'); remove the
now-dead 'last_n_hours' key from both locale files.
Add tests for the dash separator format and the 'Now' label.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two mobile-friendly tweaks to the Route card stats and chart labels, addressing the stats row wrapping to two lines on narrow viewports.
Changes
Stats dash separator (Routes.tsx)
0/2->6instead of0/2=>6). The arrow character was wider, contributing to the stats row overflowing and wrapping on mobile portrait.Chart label (Routes.tsx)
i18n (en.json, nl.json)
common.now: "Now" / "Nu"routes.last_n_hourskey from both localesTests (Routes.test.tsx)
3/5-2renders (verifying dash, not arrow)common.nowlabel rendersVerification
npx tsc --noEmit— cleannpx vitest run— 339/339 passingpre-commit run --all-files— all green